package com.iptv.grape.event.data;

import com.iptv.grape.domain.Channel;
import com.iptv.grape.domain.ChannelBill;
import com.iptv.grape.util.CommUtil;

import java.util.Date;

// 回看数据采集
public class BackLiveData {
    // 回看频道ChannelId(频道号)
    private String channelID;
    // 回看频道名称
    private String programChannelName;
    // 回看节目的媒资ID  节目单编码
    private String asssetID;
    // 回看节目名称
    private String programName;

    // 回看节目总时长，单位秒
    private int programDuration;
    // 回看节目的操作类型(0：播放;1：快进;2：快退;3：暂停)
    private int programOperateType;

    // 播放速率
    private String pace;
    // 进入回看方式（1、推荐位 2、菜单+确定 3、节目单列表 4、时移进入(回看节目单的切换)  5、其它）
    private String enterChannelType;
    // 节目操作时间
    //private String startTime;
    // 进入退出（0：进入；1：退出）
    private String state;

    private String reserve1;
    private String reserve2;


    private static BackLiveData curBackLiveData;

    public static BackLiveData getCurBackLiveData() {
        return curBackLiveData;
    }

    public static void createBackLiveData(Channel channel, ChannelBill selectBill){
        BackLiveData backLiveData = new BackLiveData();
        backLiveData.channelID = channel.getChannelNo() + "";
        backLiveData.programChannelName = channel.getName();
        backLiveData.asssetID = selectBill.getCode();
        backLiveData.programName = selectBill.getName();
        backLiveData.programDuration = selectBill.getDuration();
        backLiveData.programOperateType = 0;
        backLiveData.pace = "";
        backLiveData.enterChannelType = "3";
        //backLiveData.startTime = CommUtil.formatDate(new Date(),"yyyyMMddHHmmss");
        backLiveData.state = "0";
        curBackLiveData = backLiveData;
    }

    public String getReserve1() {
        return reserve1;
    }

    public void setReserve1(String reserve1) {
        this.reserve1 = reserve1;
    }

    public String getReserve2() {
        return reserve2;
    }

    public void setReserve2(String reserve2) {
        this.reserve2 = reserve2;
    }

    public String getChannelID() {
        return channelID;
    }

    public void setChannelID(String channelID) {
        this.channelID = channelID;
    }

    public String getProgramChannelName() {
        return programChannelName;
    }

    public void setProgramChannelName(String programChannelName) {
        this.programChannelName = programChannelName;
    }

    public String getAsssetID() {
        return asssetID;
    }

    public void setAsssetID(String asssetID) {
        this.asssetID = asssetID;
    }

    public String getProgramName() {
        return programName;
    }

    public void setProgramName(String programName) {
        this.programName = programName;
    }

    public int getProgramDuration() {
        return programDuration;
    }

    public void setProgramDuration(int programDuration) {
        this.programDuration = programDuration;
    }

    public int getProgramOperateType() {
        return programOperateType;
    }

    public void setProgramOperateType(int programOperateType) {
        this.programOperateType = programOperateType;
    }

    public String getPace() {
        return pace;
    }

    public void setPace(String pace) {
        this.pace = pace;
    }

    public String getEnterChannelType() {
        return enterChannelType;
    }

    public void setEnterChannelType(String enterChannelType) {
        this.enterChannelType = enterChannelType;
    }

    public String getStartTime() {
        return CommUtil.formatDate(new Date(),"yyyyMMddHHmmss");
    }



    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }
}
